package com.immo.libcommon.utils;

import android.annotation.SuppressLint;

import java.text.SimpleDateFormat;
import java.util.Date;

/**
 * @author Administrator
 * @content 时间格式工具类
 * @date 2018/7/30
 */
public class TimeUtil {
    /**
     * 将时间戳转换为时间
     */
    public static String stampToDate(long s) {
        String res;
        @SuppressLint("SimpleDateFormat")
        SimpleDateFormat simpleDateFormat = new SimpleDateFormat("yyyy/MM/dd HH:mm:ss");
        Date date = new Date(s);
        res = simpleDateFormat.format(date);
        return res;
    }
}
